package com.zan.pattern.decorator;

/**
 * @Author Zan
 * @Create 2024-04-25 23:23
 * @Description : 装饰者类(抽象装饰者角色)
 * @ClassName: Garnish
 */
// 不知道具体的价格（不知道需要加哪些配料），因此设置为抽象类，不重写cost方法
public abstract class Garnish extends FastFood {

    // 声明快餐类的变量
    private FastFood fastFood;

    public FastFood getFastFood() {
        return fastFood;
    }

    public void setFastFood(FastFood fastFood) {
        this.fastFood = fastFood;
    }

    public Garnish(FastFood fastFood, float price, String desc) {
        super(price, desc);
        this.fastFood = fastFood;
    }
}
